package com.yzc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yzc.pojo.RegisterUser;
import com.yzc.util.ResultData;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface RegisterMapper extends BaseMapper<RegisterUser> {

   @Insert("INSERT into t_user(name,pass) SELECT #{name},#{pass} WHERE not EXISTS (SELECT * FROM t_user WHERE name = #{name})")
   int addUser(RegisterUser user);


}
